#ifndef UDP_H
#define UDP_H

#include <stdlib.h>
#include <unistd.h>

#include "sockets_.h"

class Udp  : public Sockets_
{
       int n, puerto;
       unsigned int length;
       struct sockaddr_in server, pc2;
       struct hostent *hp;
       char buffer[2048];
       char *host;
       socklen_t fromlen;
public:
    Udp();

    void enviar(char buffer[]);
    void enviar(char buffer[] ,int puerto ,char *host );
    char* recibir();
    char* recibir(int);
    void conexion(int puerto ,char *host);
};

#endif // UDP_H
